Skip to content

refactor: remove the ReScript CLI; the Elixir escript is the sole CLI - #76

Merged
hyperpolymath merged 1 commit into
mainfrom
claude/odds-sods-pm-goals-xktszo
Jul 21, 2026
Merged

refactor: remove the ReScript CLI; the Elixir escript is the sole CLI#76
hyperpolymath merged 1 commit into
mainfrom
claude/odds-sods-pm-goals-xktszo

Conversation

@hyperpolymath

Copy link
Copy Markdown
Owner

Removes the redundant ReScript CLI, per the estate "no ReScript" policy. Scope is CLI-only (owner-approved) — opsm_mobile's ReScript is deferred to a next-version follow-up.

Why this is safe

OPSM carried two parallel CLIs: the Elixir escript (Opsm.CLI, 807 tests, mix escript.build) and a ReScript CLI (cli/Main.res.js, run via Deno). The escript already covers the same surface — trust-pipeline commands and the checky-monkey/oikos/palimpsest clients — so the ReScript copy was redundant. Nothing imports cli/ or lib/ocaml/, and no CI compiles ReScript (the .res.js were committed and run directly).

lib/ocaml/*.res was a byte-identical dead duplicate of cli/*.res (diff -q confirms all 5 shared modules identical).

What changed (−5,109 lines)

Deleted: cli/*.res (+ compiled .res.js), lib/ocaml/* (+ .cmj, rescript.lock), and rescript.json / deno.json / deno.lock — the last three existed solely to build/run that CLI (deno.json exported cli/Main.res.js; every task was rescript/cli). No other main-tree code uses Deno; opsm_mobile has its own.

Rewired onto the escript:

  • Justfile + contractiles/Justfile: dropped build-cli, build-cli-watch, test-cli, fmt-deno, deno-lint, opsm-cli, the deno clean step, and .res references in loc/todos/doctor. buildbuild-escript; lintmix compile --warnings-as-errors (credo isn't a dep, and just lint is a mandatory Mustfile check that must actually run).
  • k9iser.toml: removed the deno.json [[source]] + deno.imports [[constraint]] — the "Validate K9 contracts" CI job would otherwise fail on the missing file.
  • echidna-validation.yml: dropped the now-dead cli/** push path trigger.
  • .bot_directives/sustainabot.a2ml: dropped deno.json/deno.lock watches.
  • docs/TOOLCHAIN.adoc: Deno's remaining consumer is opsm_mobile, not the root CLI.

Verified (OTP 28.3.1 / Elixir 1.19.5, real toolchain here)

  • mix escript.build succeeds; ./opsm --help runs (the CLI works)
  • mix compile --warnings-as-errors clean; just toolchain-check clean
  • Full dangling-reference sweep across config/CI/manifests — no leftover pointers to the deleted files (opsm_mobile + vendored deps excluded)

Known / expected

The governance ReScript check stays red on opsm_mobile/src/*.res (5 files) until the deferred follow-up removes/migrates those — owner-marked for the next version, recorded in STATE.a2ml next-actions. This PR is the CLI-scope slice.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Kq24sZCEohSrNFXSuEuz6C


Generated by Claude Code

OPSM carried two parallel CLIs: the Elixir escript (Opsm.CLI, 807 tests,
`mix escript.build`) and a ReScript CLI (cli/Main.res.js, run via Deno).
The escript already covered the same surface — trust-pipeline commands
and the checky-monkey/oikos/palimpsest clients — so the ReScript copy
was redundant. Per the estate "no ReScript" policy, remove it (owner-
approved scope: the CLI only; opsm_mobile's ReScript is deferred to a
follow-up, recorded in STATE.a2ml next-actions).

Deleted:
- cli/*.res (+ compiled .res.js) — the ReScript CLI
- lib/ocaml/*.res (+ .cmj, rescript.lock) — a byte-identical dead
  duplicate of cli/ (diff -q confirms 5/5 shared modules identical)
- rescript.json, deno.json, deno.lock — existed solely to build/run
  that CLI (deno.json exports cli/Main.res.js; every task was rescript/
  cli). No other main-tree code uses Deno; opsm_mobile has its own.

Rewired onto the escript:
- Justfile + .machine_readable/contractiles/Justfile: dropped build-cli,
  build-cli-watch, test-cli, fmt-deno, deno-lint, opsm-cli, the deno
  clean step, and .res references in loc/todos/doctor. `build` -> just
  build-escript; `lint` -> `mix compile --warnings-as-errors` (credo is
  not a dep, and `just lint` is a mandatory Mustfile check that must run)
- k9iser.toml: removed the deno.json [[source]] and the deno.imports
  [[constraint]] (the "Validate K9 contracts" CI job would otherwise fail
  on the missing file)
- echidna-validation.yml: dropped the now-dead `cli/**` push path trigger
- .bot_directives/sustainabot.a2ml: dropped deno.json/deno.lock watches
- docs/TOOLCHAIN.adoc: Deno's remaining consumer is opsm_mobile, not the
  root CLI

Verified (OTP 28.3.1 / Elixir 1.19.5): `mix escript.build` succeeds and
`./opsm --help` runs; `mix compile --warnings-as-errors` clean;
`just toolchain-check` clean; no dangling refs to the deleted files in
any config/CI/manifest (opsm_mobile and vendored deps excluded).

Note: the governance ReScript check stays red on opsm_mobile/src/*.res
until the deferred follow-up removes/migrates those — owner-marked for
the next version.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Kq24sZCEohSrNFXSuEuz6C
@hyperpolymath
hyperpolymath marked this pull request as ready for review July 21, 2026 22:29
@hyperpolymath
hyperpolymath merged commit 02d27cf into main Jul 21, 2026
20 of 21 checks passed
@hyperpolymath
hyperpolymath deleted the claude/odds-sods-pm-goals-xktszo branch July 21, 2026 22:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants